import Vuex from 'vuex';
import Vue from 'vue';
import createPersistedState from "vuex-persistedstate"; 
Vue.use(Vuex);


export default new Vuex.Store({
    // 添加持久化插件
    plugins: [createPersistedState()],
    state: {
        phone: '13800000000',
        token: '',
        title: '111111111111'
    },


    mutations: {
        set_title(state,payload) {
            state.title = payload;
        },

        set_phone(state, payload) {
            state.phone = payload;
        },
        set_token(state, payload) {
            state.token = payload;
        }
    }
})